class Challenge < ActiveRecord::Base
  belongs_to :sender, :class_name=>"User",:foreign_key=>:from_user_id
  belongs_to :goter,:class_name=>"User",:foreign_key=>:to_user_id
  belongs_to :match
  named_scope :placed_bet,:conditions=>["mode=?","bet_1"]
  named_scope :not_accept_bet,:conditions=>["mode=?","bet_0"]

end
